#!/bin/bash

checkStatus()
{
	if [ $? != 0 ]
	then
	exit 1
	fi
}

othb=构建项目_$RANDOM;
checkStatus;
git pull;
checkStatus;
rm -rf ../gs-agent-online/*;
checkStatus;
\cp -rf ./dist/* ../gs-agent-online/;
checkStatus;
cd ../gs-agent-online/ && git add . && git commit -m $othb;
checkStatus;
git push;
